/**
 * @file main.cc
 * 
 * @author Bono.ASUN.TamGitsun (gitsun.tam@outlook.com)
 * @brief 
 * @version 0.1
 * @date 2022-02-06
 * 
 * @copyright Copyright (c) 2022
 * 
 */


#include <utils/logger/Logger.hh>

#include <apps/IApplication.hh>
#include <apps/ect_random_data/Application.hh>


#define LOG_TAG "Main"
#define THIS_FILE "main.cc"


using namespace ECT::APPS;
using namespace TGS::utils;


int main(int argc, char * argv[])
{
    int ret = 0;
    mlog_i(LOG_TAG, THIS_FILE, "Electricity Consumption Terminal");
    DLogger().set_log_level(ILogger::LEVEL_DEBUG);
    IApplication * app = new RANDOM_DATA::Application();
    app->set_property(RANDOM_DATA::Application::PROPERTY_URI, "COM3:115200");
    // app->set_property(RANDOM_DATA::Application::PROPERTY_RUN_DURATION, "3600000");
    ret = app->main_entry();
    delete app;
    mlog_i(LOG_TAG, THIS_FILE, "Bye~");
    return ret;
}
